package com.ruoyi.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.function.mapper.InterchangeStatMapper;
import com.ruoyi.function.domain.InterchangeStat;
import com.ruoyi.function.service.IInterchangeStatService;

/**
 * 枢纽互通统计Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class InterchangeStatServiceImpl implements IInterchangeStatService 
{
    @Autowired
    private InterchangeStatMapper interchangeStatMapper;

    /**
     * 查询枢纽互通统计
     * 
     * @param id 枢纽互通统计主键
     * @return 枢纽互通统计
     */
    @Override
    public InterchangeStat selectInterchangeStatById(Long id)
    {
        return interchangeStatMapper.selectInterchangeStatById(id);
    }

    /**
     * 查询枢纽互通统计列表
     * 
     * @param interchangeStat 枢纽互通统计
     * @return 枢纽互通统计
     */
    @Override
    public List<InterchangeStat> selectInterchangeStatList(InterchangeStat interchangeStat)
    {
        return interchangeStatMapper.selectInterchangeStatList(interchangeStat);
    }

    /**
     * 新增枢纽互通统计
     * 
     * @param interchangeStat 枢纽互通统计
     * @return 结果
     */
    @Override
    public int insertInterchangeStat(InterchangeStat interchangeStat)
    {
        return interchangeStatMapper.insertInterchangeStat(interchangeStat);
    }

    /**
     * 修改枢纽互通统计
     * 
     * @param interchangeStat 枢纽互通统计
     * @return 结果
     */
    @Override
    public int updateInterchangeStat(InterchangeStat interchangeStat)
    {
        return interchangeStatMapper.updateInterchangeStat(interchangeStat);
    }

    /**
     * 批量删除枢纽互通统计
     * 
     * @param ids 需要删除的枢纽互通统计主键
     * @return 结果
     */
    @Override
    public int deleteInterchangeStatByIds(Long[] ids)
    {
        return interchangeStatMapper.deleteInterchangeStatByIds(ids);
    }

    /**
     * 删除枢纽互通统计信息
     * 
     * @param id 枢纽互通统计主键
     * @return 结果
     */
    @Override
    public int deleteInterchangeStatById(Long id)
    {
        return interchangeStatMapper.deleteInterchangeStatById(id);
    }

    @Override
    public boolean hasChildById(Long id)
    {
        return interchangeStatMapper.hasChildById(id) > 0;
    }
}
